package com.xh.bussiness.tiku.dao;

import com.xh.bussiness.tiku.bean.request.PaperQueryRequest;
import com.xh.bussiness.tiku.bean.request.PaperRequest;
import com.xh.bussiness.tiku.model.Paper;
import com.xh.core.bean.XhPage;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * <p>
 * 试卷表 Mapper 接口
 * </p>
 *
 * @author daiwei
 * @since 2019-02-23
 */
public interface PaperMapper extends BaseMapper<Paper> {

	List<Paper> queryCheckPaper(@Param("page") XhPage<Paper> page,@Param("bean") PaperRequest bean);

	Long queryCheckPaperCount(PaperRequest request);

	XhPage<PaperQueryRequest> queryExercise(@Param("page") XhPage<Paper> page, @Param("request") PaperQueryRequest request);

	XhPage<PaperQueryRequest> queryEntranceTest(@Param("page") XhPage<Paper> page, @Param("request") PaperQueryRequest request);

	void updateAnswerCount(@Param("id")String id);

	List<String> selectPaperQuestion(@Param("paperId")String paperId);

	Integer selectScoreSum(@Param("ids")List<String> ids);
}
